package collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo1 {
    public static void main(String[] args) {
        Collection c=new ArrayList();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("tour");
        System.out.println(c);//[one, two, three, tour]
        System.out.println("集合大小："+c.size());
        System.out.println("集合是否为空集："+c.isEmpty());
        c.clear();
        System.out.println(c);//[]
        System.out.println("集合大小："+c.size());
        System.out.println("集合是否为空集："+c.isEmpty());
    }
}
